import Vue from 'vue';
import VueRouter from 'vue-router';
import CommonTemplate from '@/views/layout/commonTemplate';

Vue.use(VueRouter);

export const routes = [
  {
    path: '/',
    redirect: '/nav'
  },
  {
    path: '/user',
    component: CommonTemplate,
    children: [{
      path: '/nav',
      component: () => import('@/views/nav')
    },
    {
      path: '/info',
      component: () => import('@/views/test/info')
    }]
  }
];

const router = new VueRouter({
  routes
});

export default router;
